import { defineComponent, reactive, Teleport } from "vue";
import styles from "./DraftPopup.module.less";

export default defineComponent({
  setup(props, { expose }) {
    const state = reactive({
      isShow: false,
    })
    const open = () => {
      state.isShow = true;
    }
    expose({
      open,
    });
    return () => (
        <div class={styles['draft-popup-floating']} v-show={state.isShow}>
          <div class={styles['draft-popup-card']}>
            <div class={styles['draft-popup-header']}>保存至草稿箱</div>
            <div class={styles['draft-popup-container']}>
              <span>您可在「会员中心 - 订单管理 - 意外险订单」-「草稿箱」中继续编辑投保单！</span>
            </div>
            <div class={styles['draft-popup-footer']}>
              <div class={styles['footer-btn']} onClick={() => {state.isShow = false}}>取消</div>
              <div class={styles['footer-btn']}>保存</div>
            </div>
          </div>
        </div>
    )
  }
})